package com.coffee.sku.service.sku.dao;

import com.coffee.sku.api.sku.query.RegionalSkuQuery;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.SkuListResult;
import com.coffee.sku.service.sku.bean.RegionalSku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionalSkuDao {
    public RegionalSku findById(Integer id);

    public RegionalSku findBySkuId(Integer skuId);

    public RegionalSku findByIdForUpdate(Integer id);

    public List<RegionalSku> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuListReq param);

    public List<SkuListResult> page(@Param("param") SkuListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<RegionalSku> listAll();

    public RegionalSku findFirst(@Param("param") RegionalSkuQuery param);

    public Integer insert(RegionalSku param);

    Integer insertBatch(List<RegionalSku> list);

    public void updateById(@Param("param") RegionalSku param);

    public void updateBySkuId(@Param("param") RegionalSku param);

    public Integer deleteById(Integer id);

    public Integer deleteBySkuId(Integer skuId);

    public Integer deleteByIds(List<Integer> idList);

    public List<Integer> findSkuIds();

    SkuListResult getSkuListResult(Integer skuId);

}